#include <iostream>
#include <vector>
using namespace std;
class Solution
{
public:
    int valueAfterKSeconds(int n, int k)
    {
        vector<long> a(n, 1);
        for (int i = 1; i < k; i++)
        {
            for (int j = n - 2; j > -1; j--)
            {
                a[j] = (a[j + 1] + a[j]) % static_cast<long>(1'000'000'007);
            }
        }
        long res = 0;
        for (auto val : a)
        {
            res += val;
            res %= static_cast<long>(1'000'000'007);
        }
        return res;
    }
};
int main()
{
    cout << "Code3179" << endl;
    Solution s;
    cout << s.valueAfterKSeconds(22, 15);
    return 0;
}